package com.eas.biz.dao.statistic.dataobject;

import com.eas.biz.framework.BaseQuery;

public class QuestionStatisticQuery extends BaseQuery {

    private Long examId;

    private String scopeType;

    private Long scopeId;

    private String subject;

    private String questionNumber;

    private Integer isObjective;

    private Long statisticId;

    public Long getExamId() {
        return examId;
    }

    public void setExamId(Long examId) {
        this.examId = examId;
    }

    public String getScopeType() {
        return scopeType;
    }

    public void setScopeType(String scopeType) {
        this.scopeType = scopeType;
    }

    public Long getScopeId() {
        return scopeId;
    }

    public void setScopeId(Long scopeId) {
        this.scopeId = scopeId;
    }

    public String getQuestionNumber() {
        return questionNumber;
    }

    public void setQuestionNumber(String questionNumber) {
        this.questionNumber = questionNumber;
    }

    public Long getStatisticId() {
        return statisticId;
    }

    public void setStatisticId(Long statisticId) {
        this.statisticId = statisticId;
    }

    public String getSubject() {
        return subject;
    }

    public void setSubject(String subject) {
        this.subject = subject;
    }

    public Integer getIsObjective() {
        return isObjective;
    }

    public void setIsObjective(Integer isObjective) {
        this.isObjective = isObjective;
    }

    public void setIsObjective(boolean isObjective) {
        this.isObjective = isObjective ? 1 : 0;
    }

    public void orderByAnswer(boolean isDesc) {
        setSortBy("answer");
        setSort(isDesc ? "desc" : "asc");
    }
}
